<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
 <link rel="icon" type="image/vnd.microsoft.icon" href="http://www.gstatic.com/codesite/ph/images/phosting.ico">
 
 <script type="text/javascript">
 
 
 
 var codesite_token = "55b122417e72b952b1b3411d91b5d902";
 
 
 var logged_in_user_email = "efhennum@gmail.com";
 
 
 var relative_base_url = "";
 
 </script>
 
 
 <title>UserGuide - 
 xspec -
 
 A guide for users of XSpec - Project Hosting on Google Code</title>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
 
 <meta name="ROBOTS" content="NOARCHIVE">
 
 <link type="text/css" rel="stylesheet" href="http://www.gstatic.com/codesite/ph/14756227129406843427/css/ph_core.css">
 
 <link type="text/css" rel="stylesheet" href="http://www.gstatic.com/codesite/ph/14756227129406843427/css/ph_detail.css" >
 
 
 
 <link type="application/atom+xml" rel="alternate" href="/feeds/p/xspec/svnchanges/basic?path=/wiki/UserGuide.wiki">
 
 
<!--[if IE]>
 <link type="text/css" rel="stylesheet" href="http://www.gstatic.com/codesite/ph/14756227129406843427/css/d_ie.css" >
<![endif]-->
 <style type="text/css">
 .menuIcon.off { background: no-repeat url(http://www.gstatic.com/codesite/ph/images/dropdown_sprite.gif) 0 -42px }
 .menuIcon.on { background: no-repeat url(http://www.gstatic.com/codesite/ph/images/dropdown_sprite.gif) 0 -28px }
 .menuIcon.down { background: no-repeat url(http://www.gstatic.com/codesite/ph/images/dropdown_sprite.gif) 0 0; }
 </style>
</head>
<body class="t6">
 <script type="text/javascript">
 var _gaq = _gaq || [];
 _gaq.push(
 ['siteTracker._setAccount', 'UA-18071-1'],
 ['siteTracker._trackPageview']);
 
 _gaq.push(
 ['projectTracker._setAccount', 'UA-5548232-1'],
 ['projectTracker._trackPageview']);
 
 (function() {
 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
 (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
 })();
 </script>
 <div id="gaia">
 
 <span>
 
 
 <b>efhennum@gmail.com</b>
 
 
 | <a href="/u/efhennum/" id="projects-dropdown" onclick="return false;"
 ><u>My favorites</u> <small>&#9660;</small></a>
 | <a href="/u/efhennum/" onclick="_CS_click('/gb/ph/profile');" 
 title="Profile, Updates, and Settings"
 ><u>Profile</u></a>
 | <a href="https://www.google.com/accounts/Logout?continue=http%3A%2F%2Fcode.google.com%2Fp%2Fxspec%2Fwiki%2FUserGuide" 
 onclick="_CS_click('/gb/ph/signout');"
 ><u>Sign out</u></a>
 
 </span>

 </div>
 <div class="gbh" style="left: 0pt;"></div>
 <div class="gbh" style="right: 0pt;"></div>
 
 
 <div style="height: 1px"></div>
<!--[if IE 6]>
<div style="text-align:center;">
Support browsers that contribute to open source, try <a href="http://www.firefox.com">Firefox</a> or <a href="http://www.google.com/chrome">Google Chrome</a>.
</div>
<![endif]-->




 <table style="padding:0px; margin: 20px 0px 0px 0px; width:100%" cellpadding="0" cellspacing="0">
 <tr style="height: 58px;">
 
 <td style="width: 55px; text-align:center;">
 <a href="/p/xspec/">
 
 <img src="http://www.gstatic.com/codesite/ph/images/defaultlogo.png" alt="Logo">
 
 </a>
 </td>
 
 <td style="padding-left: 0.5em">
 
 <div id="pname" style="margin: 0px 0px -3px 0px">
 <a href="/p/xspec/" style="text-decoration:none; color:#000">xspec</a>
 
 </div>
 <div id="psum">
 <i><a id="project_summary_link" href="/p/xspec/" style="text-decoration:none; color:#000">BDD framework for XSLT</a></i>
 </div>
 
 </td>
 <td style="white-space:nowrap;text-align:right">
 
 <form action="/hosting/search">
 <input size="30" name="q" value="">
 <input type="submit" name="projectsearch" value="Search projects" >
 </form>
 
 </tr>
 </table>


 
<table id="mt" cellspacing="0" cellpadding="0" width="100%" border="0">
 <tr>
 <th onclick="if (!cancelBubble) _go('/p/xspec/');">
 <div class="tab inactive">
 <div class="round4"></div>
 <div class="round2"></div>
 <div class="round1"></div>
 <div class="box-inner">
 <a onclick="cancelBubble=true;" href="/p/xspec/">Project&nbsp;Home</a>
 </div>
 </div>
 </th><td>&nbsp;&nbsp;</td>
 
 
 
 
 <th onclick="if (!cancelBubble) _go('/p/xspec/downloads/list');">
 <div class="tab inactive">
 <div class="round4"></div>
 <div class="round2"></div>
 <div class="round1"></div>
 <div class="box-inner">
 <a onclick="cancelBubble=true;" href="/p/xspec/downloads/list">Downloads</a>
 </div>
 </div>
 </th><td>&nbsp;&nbsp;</td>
 
 
 
 
 
 <th onclick="if (!cancelBubble) _go('/p/xspec/w/list');">
 <div class="tab active">
 <div class="round4"></div>
 <div class="round2"></div>
 <div class="round1"></div>
 <div class="box-inner">
 <a onclick="cancelBubble=true;" href="/p/xspec/w/list">Wiki</a>
 </div>
 </div>
 </th><td>&nbsp;&nbsp;</td>
 
 
 
 
 
 <th onclick="if (!cancelBubble) _go('/p/xspec/issues/list');">
 <div class="tab inactive">
 <div class="round4"></div>
 <div class="round2"></div>
 <div class="round1"></div>
 <div class="box-inner">
 <a onclick="cancelBubble=true;" href="/p/xspec/issues/list">Issues</a>
 </div>
 </div>
 </th><td>&nbsp;&nbsp;</td>
 
 
 
 
 
 <th onclick="if (!cancelBubble) _go('/p/xspec/source/checkout');">
 <div class="tab inactive">
 <div class="round4"></div>
 <div class="round2"></div>
 <div class="round1"></div>
 <div class="box-inner">
 <a onclick="cancelBubble=true;" href="/p/xspec/source/checkout">Source</a>
 </div>
 </div>
 </th><td>&nbsp;&nbsp;</td>
 
 
 <td width="100%">&nbsp;</td>
 </tr>
</table>
<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0" class="st">
 <tr>
 
 
 
 <td>
 <div class="issueDetail">
<div class="isf">
 
 <span class="inIssueList"> 
 <span>Search</span>
 <form action="/p/xspec/w/list" method="GET" style="display:inline">
 <select id="can" name="can" style="font-size:92%">
 <option disabled="disabled">Search within:</option>
 
 <option value="1" >&nbsp;All wiki pages</option>
 <option value="3" >&nbsp;Featured pages</option>
 <option value="2" selected="selected">&nbsp;Current pages</option>
 
 
 <option value="5" {is can "5"}selected="selected"{end}>&nbsp;My starred pages</option>
 
 <option value="4" >&nbsp;Deprecated pages</option>
 
 </select>
 <span>for</span>
 <span id="qq"><input type="text" size="38" id="searchq" name="q" value=""
 autocomplete="off" style="font-size:92%" ></span>
 
 
 <input type="submit" value="Search" style="font-size:92%" >
 </form>
 </span>

 
 
 
 
 
 
 

</div>
</div>

 </td>
 
 
 
 
 
 
 <td height="4" align="right" valign="top" class="bevel-right">
 <div class="round4"></div>
 <div class="round2"></div>
 <div class="round1"></div>
 </td>
 </tr>
</table>
<script type="text/javascript">
 var cancelBubble = false;
 function _go(url) { document.location = url; }
</script>


<div id="maincol"
 
>

 
<!-- IE -->







 <style type="text/css">
 .artifactcomment {
 margin: .5em 0 0 0;
 padding: .3em 0 .3em .3em;
 border-top: 3px solid #c3d9ff;
 }
 #commentlist {
 border-bottom: 3px solid #c3d9ff;
 }
 #commentform { padding-top: 1em; }
 .delcom { background: #e8e8e8 }
 .commentcontent { margin: 1em 0;}
 </style>


 <div id="wikicontent">
 <table width="100%" border="0" cellspacing="0" cellpadding="0">
 <tr>
 
 <td class="vt" id="wikimaincol" width="100%">
 
 <div style="float:right; width:18em" id="wikimeta">
 <div class="pmeta_bubble_bg">
 <div class="round4"></div>
 <div class="round2"></div>
 <div class="round1"></div>
 <div class="box-inner">
 <table style="padding: 5px">
 <tr><td colspan="2" style="padding-bottom:5px">Updated <span title="Thu Feb  4 15:01:24 2010">Feb 04, 2010</span>
 
 by <a style="white-space: nowrap" href="/u/jeni.tennison/">jeni.tennison</a>
 </td></tr>
 
 <tr><th class="vt">Labels:</th>
 <td>
 
 <a href="/p/xspec/w/list?q=label:Featured"
 title="Listed on project home page"
 >Featured</a>, 
 
 <a href="/p/xspec/w/list?q=label:Phase-Deploy"
 title="How to install and configure the program"
 >Phase-Deploy</a>
 
 </td>
 </tr>
 
 
 </table>
 </div>
 <div class="round1"></div>
 <div class="round2"></div>
 <div class="round4"></div>
 </div>
 </div>
 
 <div id="wikiheader" style="margin-bottom:1em">
 
 <img width="15" height="15" id="star_img"
 src="http://www.gstatic.com/codesite/ph/images/star_off.gif"
 style="cursor:pointer"
 
 onclick="_CS_toggleStar(this,
 '',
 {'scope': 'wiki',
 'user': '_CURRENT_USER',
 'item': 'xspec:UserGuide',
 'token': codesite_token
 });"/>
 
 &nbsp;
 <span style="font-size:120%;font-weight:bold">UserGuide</span>
 &nbsp;
 
 
 <div style="font-style:italic; margin-top: 3px">A guide for users of XSpec</div>
 
 </div>
 <h1><a name="Introduction"/>Introduction<a href="#Introduction" class="section_anchor">&para;</a></h1><p>XSpec is a <a href="http://en.wikipedia.org/wiki/Behavior_Driven_Development" rel="nofollow">Behaviour Driven Development</a> (BDD) framework for XML processing, currently focused on <a href="http://www.w3.org/TR/xslt20" rel="nofollow">XSLT</a>. </p><p>BDD is like Test Driven Development (TDD) in that it encourages you to develop your code by </p><ol><li>describing a behaviour (or writing a test) </li><li>testing whether your code gives that behaviour </li><li>if it doesn&#x27;t, fixing the code until it does and the test passes </li></ol><p>The difference between BDD and TDD is about how you write the tests. In BDD, your focus is on the behaviour of the code: the descriptions form the double role of both a human-readable documentation of what the code should do and runnable tests that can test whether the code does what it should do. </p><p>In BDD, we describe <strong>scenarios</strong> and the expected behaviour of the application with these scenarios. Scenarios fit particularly well with XSLT&#x27;s source-driven (or template-driven) approach. For example, a scenario might be: </p><blockquote>when processing a <tt>&lt;para&gt;</tt> element, it should create a <tt>&lt;p&gt;</tt> element. 
</blockquote><p>or something more complex like: </p><blockquote>when processing a <tt>&lt;fn&gt;</tt> element with a <tt>label</tt> attribute in <tt>footnote</tt> mode,  
it should create a <tt>&lt;p&gt;</tt> element with a <tt>&lt;sup&gt;</tt> child holding the value of the <tt>label</tt> element. 
</blockquote><p>Scenarios written like this naturally map onto XSLT templates. </p><h1><a name="From_Here"/>From Here<a href="#From_Here" class="section_anchor">&para;</a></h1><ul><li>Learn how to <a href="WritingScenarios.html">write XSpec scenarios</a>. </li><li>Learn how to <a href="RunningScenarios.html">run XSpec scenarios</a>. </li></ul>
 </td> 
 </tr>
 </table>
 </div>


 
 <br>
 


 
 
 

<div class="collapse">


 


<div id="commentlist">

 
 <div class="artifactcomment"
 
 >
 
 
 
 
 
 
 <span class="author">Comment
 
 by
 
 <a style="white-space: nowrap" href="/u/@UBNfQ1BRAhhMWQN0/">cms...@blackmesatech.com</a>,
 
 </span>
 <span class="date" title="Mon Oct 26 14:17:09 2009">Oct 26, 2009</span>
 <div>
<div class="commentcontent">
<p>Suggestion:  a list of known current limitations, issues, shortcomings, gotchas, and other items new users may trip on would be helpful. </p><p>An entry in that list:   </p><p>If the stylesheet being tested has an xsl:output parameter with public and system identifiers for a DTD, they will show up in the report document (where they do not, strictly speaking, belong), complicating life for everyone. </p>
</div>
 
 
 </div>
 </div>
 

</div>
</div>

 


 <script type="text/javascript">
 function delComment(sequence_num, create_time, delete_mode) {
 var f = document.forms["delcom"];
 f.sequence_num.value = sequence_num;
 f.create_time.value = create_time;
 f.mode.value = delete_mode;
 f.submit();
 return false;
 }
 </script>


 
 
 
 
 
 <div id="commentform">
 <form action="../w/detail.do" method="post">
 <table>
 <tr><td class="vt">
 <input type="hidden" name="pagename" value="UserGuide" >
 <input type="hidden" name="token" value="55b122417e72b952b1b3411d91b5d902" >
 <div>Enter a comment:</div>
 <textarea name="content" rows="6" cols="80"></textarea><br><br>
 <input type="submit" name="submit" value="Submit" >
 </td>
 <td class="vt">
 <div id="whb" class="tip" style="width:15em">
 <div class="round4"></div>
 <div class="round2"></div>
 <div class="round1"></div>
 <div class="box-inner closed"
 id="entrybubble">
 <a class="ifClosed" href="#whb" style="float:right"
 onclick="_toggleHidden(this); document.getElementById('wikihelp').value='opened'">show</a>
 <a class="ifOpened" href="#whb" style="float:right"
 onclick="_toggleHidden(this); document.getElementById('wikihelp').value='closed'"
 >hide</a>
 <b>Wiki markup help</b>
 <div class="ifOpened">
 <div style="padding:2px; font-size:96%">
 =Heading1=<br>
 ==Heading2==<br>
 ===Heading3===<br>
 <br>
 *bold* &nbsp; &nbsp;
 _italic_<br>
 `inline code`<br>
 escape: `*`<br>
 <br>
 Indent lists 2 spaces:<br>
 &nbsp;&nbsp;* bullet item<br>
 &nbsp;&nbsp;# numbered list<br>
 <br>
 {{{<br>
 verbatim code block<br>
 }}}<br>
 <br>
 Horizontal rule<br>
 ----
 <br>
 <br>
 WikiWordLink<br>
 [http://domain/page&nbsp;label]<br>
 http://domain/page<br>
 <br>
 || table || cells ||<br>
 
 </div><br>
 <a href="http://code.google.com/p/support/wiki/WikiSyntax" target="new">More
 examples</a>
 <a href="http://code.google.com/p/support/wiki/WikiSyntax" target="new"><img
 src="http://www.gstatic.com/codesite/ph/images/tearoff_icon.gif" width="16" height="16"/></a>
 </div>
 </div>
 <div class="round1"></div>
 <div class="round2"></div>
 <div class="round4"></div>
</div>
<input type="hidden" name="wikihelp" id="wikihelp" value="closed" >

 </td></tr>
 </table>
 </form>
 </div>
 
 
 

<form name="delcom" action="../w/delComment.do" method="POST">
 <input type="hidden" name="sequence_num" value="" >
 <input type="hidden" name="create_time" value="" >
 <input type="hidden" name="mode" value="" >
 <input type="hidden" name="pagename" value="UserGuide" >
 <input type="hidden" name="token" value="55b122417e72b952b1b3411d91b5d902" >
</form>



 <script src="http://www.gstatic.com/codesite/ph/14756227129406843427/js/prettify/prettify.js"></script>
 <script type="text/javascript">
 prettyPrint();
 </script>

<script type="text/javascript" src="http://www.gstatic.com/codesite/ph/14756227129406843427/js/dit_scripts.js"></script>



  
 
 <script type="text/javascript" src="http://www.gstatic.com/codesite/ph/14756227129406843427/js/core_scripts_20081103.js"></script>
 <script type="text/javascript" src="/js/codesite_product_dictionary_ph.pack.04102009.js"></script>
 </div>
<div id="footer" dir="ltr">
 
 <div class="text">
 
 &copy;2010 Google -
 <a href="/projecthosting/terms.html">Terms</a> -
 <a href="http://www.google.com/privacy.html">Privacy</a> -
 <a href="/p/support/">Project Hosting Help</a>
 
 </div>
</div>

 <div class="hostedBy" style="margin-top: -20px;">
 <span style="vertical-align: top;">Powered by <a href="http://code.google.com/projecthosting/">Google Project Hosting</a></span>
 </div>
 
 


 
 </body>
</html>


